<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@ taglib  prefix="s"  uri="/struts-tags"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>数据查询中心</title>
<link href="themes/default/images/favicon.ico" rel="shortcut icon" type="image/x-icon" />

<meta name="keywords" content=""/>
<meta name="description" content=""/>
<link href="/themes/default/css/login.css" rel="stylesheet" type="text/css" />
<link href="/css/login.css" rel="stylesheet" type="text/css" />
<style type="text/css">
</style>
</head>
<body id="login">

<div id="logbg">
  <form id="form1" name="form1" method="post" action="/system/channel_do_login.shtml">
  <div id="logbox">
    <div class="iptunit">
      <label for="textfield"><strong>用户名：</strong></label>
      <input type="text" name="userName" id="userName" class="ipt" />
    </div>
    <div class="iptunit">
      <label for="textfield2"><strong>密　码：</strong></label>
      <input type="password" name="password" id="password" class="ipt" />
    </div>
    <div class="iptunit">
      <label for="textfield2"><strong>验证码：</strong></label>
       <input id="zcode" name="imgCode" type="text" maxlength="4" size="6"  class="txt" style="width:50px" />
      <img src="/system/imgCheckCode.shtml" style="vertical-align: middle;" width="49" height="19" id="imgCode" width="50" /><a href="javascript:void(0);" style="color:#fff;" onclick="document.getElementById('imgCode').src='/system/imgCheckCode.shtml?id='+ +new Date;">看不清？换一张</a>
    </div>
    <s:if test="hasFieldErrors()">
    <div class="iptunit">
      <div class="wb_error"><s:fielderror><s:param>loginError</s:param></s:fielderror></div>
     
    </div>
    </s:if>
  </div>
  
  <div id="btnbox">
  	<span style="float:left;">&nbsp;&nbsp;<font color="red"></font></span>
    <label for="button"></label>
    <input type="submit" name="submit" id="button" value="登 录" class="btn1" />　
    <label for="button2"></label>
    <input name="button2" type="reset" class="btn1" id="button2" value="重 置" />
  </div>
  
</form>
</div>
</body>
</html>
<script type="text/javascript" src="/scripts/util.js"></script>
<script type="text/javascript" src="/scripts/form_validate.js"></script>

<script type="text/javascript">

	 validate.addvalidte(util.$('logform'),{
        rules:{
           userName:{checkNull:true},
           password:{checkNull:true,minlength:6,maxlength:20},
           imgCode:{checkNull:true}
           },
	    message:{
	       userName:{checkNull:"请输入您的用户名"},
	       password:{checkNull:"请输入密码!",minlength:"请输入6位数以上的密码!",maxlength:"最大输入20位数的密码"},
	       imgCode:{checkNull:"请输入验证码!"}
	    },
	    errorPlacement:function(e,m){
	      
	       var span = util.$('div_span_error');
	       span && (span.innerHTML=m);
	       span && (span.style.display='');
	    },
	    success:function(e){
	      
	       var span = util.$('div_span_error');
	       span && (span.innerHTML='');
	       span && (span.style.display='none');
	    }
	    });

	function _submit(){
	  return validate.getSubmit()();
	}
</script>

